package com.chsi.onjava8.stream;

import java.util.Comparator;

/**
 * @Auther shikf
 * @Date 2020-06-23 18:22
 */
public class SortedComparator {
    public static void main(String[] args) throws Exception {
        FileToWords.stream("E:/SKFProject/testProject/java_knowledge_package/onjava8/src/main/resources/Cheese.dat")
                .skip(10)
                .limit(10)
                .sorted(Comparator.naturalOrder())
                .map(w -> w + " ")
                .forEach(System.out::print);
    }
}